package exception;

import java.io.FileNotFoundException;
import java.io.FileReader;

public class LevelErrorMain {
	
	public static void main(String[] args) {
		
		try {
			int a = 1 / 0;	// ArithmeticException 발생
			
			String s = null;
			System.out.println(s.toString());
			
			FileReader fr = new FileReader("LevelErrorMain.java");			
		} catch (FileNotFoundException e) {
			System.out.println("FileNotFoundException: " + e);
		} catch (ArrayIndexOutOfBoundsException e) {
			System.out.println("ArrayIndexOutOfBoundsException" + e);
		} catch (RuntimeException e) {
			System.out.println("RuntimeException: " + e.toString());
		} catch (Exception e) {
			System.out.println("Exception: " + e.toString());
		}
		
		System.out.println("끝");
		
//		try {
//			String str = null;
//			System.out.println(str.length());
//		} catch (Exception e) {
//			e.printStackTrace();
//		}
		
	}
	
}
